{*
 * @author 		Zprofess <contact@zprofess.com>
 * @copyright  	2011 Zprofess
 * @version  	1.0
 * @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 *}
{if $reviews|@count gt 0}
<div style="background-color:#D0D1D5;padding:1px 10px 15px;">
	<h3>{l s='All reviews were posted by '}<span class="username">{$customer_name|escape:'html':'UTF-8'}</span></h3>
	{if $badges}
	<h3>{l s='Badges: '}<span class="new">{$badges}</span></h3>
	{/if}
	<h3>{l s='Total Number of Reviews: '}{$count}</h3>
	<h3>{l s='Total Helpful Votes: '}{$vlike}{l s=" out of "}{$vdislike}</h3>
</div>
{include file="$sort_dir"}
<br />
<div class="block_comment">
    <ul class="products clearfix">
    {foreach from=$reviews item=review}
        <li class="thead clearfix">
            <div class="f-right">{$review.date_add}</div>
        </li>
        <li class="item clearfix">
            <div class="info f-left">
                <a href="{$link->getProductLink((int)$review['id_product'], $review['link_rewrite'], $review['category'], $review['ean13'])}" class="product_img_link" title="{$review.name|escape:'htmlall':'UTF-8'}"><img src="{$link->getImageLink($review.link_rewrite, $review.id_image, 'medium')}" alt="{$review.legend|escape:'htmlall':'UTF-8'}" /></a>
                <h3><a href="{$link->getProductLink((int)$review['id_product'], $review['link_rewrite'], $review['category'], $review['ean13'])}" class="product_img_link" title="{$review.name|escape:'htmlall':'UTF-8'}">{$review.name|truncate:35:'...'|escape:'htmlall':'UTF-8'}</a></h3>
            </div>
            <div class="comment-detail f-left">
               <!-- <div class="f-left" {if $enable_vote == true}{/if}> -->
                    {if isset($review.new) && $review.new == 1}<span class="new">{l s='New'}</span>{/if}<span><b>{$review.title}</b></span>
                    <span style="float: right; margin-right:5px;margin-top:10px;">{l s='Helpful Votes: '}{$review.vlike}{l s=" out of "}{$review.vdislike + $review.vlike}</span>
                    {if !{$only_review}}
		                <div id="allreview-raty-{$review.id_zproduct_review}" class="displayRatingZprofess_{$review.id_zproduct_review}"></div>
		                <script type="text/javascript">
	                    $(".displayRatingZprofess_{$review.id_zproduct_review}").raty({
	                            width: 			{$configRating['width']},
	                            cancel: 		{$configRating['cancel']},
	                            cancelHint:   	"{$configRating['cancelHint']}",
	                            cancelOff:  	"{$configRating['cancelOff']}",
	                            cancelOn:   	"{$configRating['cancelOn']}",
	                            cancelPlace:  	"{$configRating['cancelPlace']}",
	                            half:  			true,
	                            space:       	false,
	                            hintList:		{$configRating['hintList']},
	                            noRatedMsg:		"{$configRating['noRatedMsg']}",
	                            number:     	{$configRating['number']},
	                            path:           "{$configRating['path']}",
	                            starHalf:		"{$configRating['starHalf']}",
	                            starOff:		"{$configRating['starOff']}",
	                            starOn:			"{$configRating['starOn']}",
	                            readOnly:		true,
	                            start: 			{$review.rating},
	                    });
	                	</script>
       				{/if}
                    <div class="content">{$review.content|escape:'html':'UTF-8'|nl2br}</div>
               <!--  </div>  -->     
            </div>
        </li>
    {/foreach}
    </ul>
</div>
{include file="$pagination_dir"}
{else}
<p class="align_center">{l s='No review was posted by user you select' mod='reviewratingsynthesis'}</p>
{/if}